10. Downloading (curl)

Downloading (curl)

curl is used in command lines or scripts to transfer data.

Use the workspace below the video to practice the commands and remember to practice locally in your computer too.

Ud206 011 Shell P7 - Downloading

Commands

  • CURL: is used in command lines or scripts to transfer data.

## Workspace

You can use this workspace to test your commands.

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: repl
  • Opened files (when workspace is loaded): n/a

Start Quiz:

Enter a shell command to download https://tinyurl.com/zeyq9vc and save it as the file dictionary.txt. Remember to use the option to follow web redirects.

Run this command on your own computer, too! You'll need to download this file for the next exercise.

SOLUTION: curl -L -o dictionary.txt 'https://tinyurl.com/zeyq9vc'

Solution:

Ud206 011 Shell P7.1 - Downloading Solution

By the way, a lot of URLs have special characters in them, such as the & sign, which have unusual meanings to the shell. That's why I'm always putting these URLs in quotes … even though these particular examples would work without them, it's a good practice to get into.

Recomendation

The Shell commands can be installed or not on your computer if you are using Linux or Mac and you have issues running the commands check the documentation specifically for the Operating System.